#coding=utf-8
'''
@author 吴雨培
@function 用于测试使用kcaffe定义的网络是否可用的脚本
'''

from dqn.net.net import *
import tensorflow as tf
input=tf.placeholder(dtype='float32',shape=[None,2],name="input")
trainNet=TrainNet({'data':input})
sess=tf.Session()
sess.run(tf.initialize_all_variables())
fc2=trainNet.layers['fc2']
with tf.variable_scope('fc2',reuse=True):
    fc2_w=tf.get_variable('weights')
    print sess.run(fc2_w)
print sess.run(fc2,feed_dict={input:[[1,2]]})
# print sess.run(tf.all_variables())
# print tf.get_variable_scope()